from threading import Thread
from time import sleep


def fun():
    sleep(3)
    print('线程属性测试')


if __name__ == "__main__":
    t = Thread(target=fun, name='Frank')
    t.setName('Rachel')
    print(t.is_alive())
    t.start()
    print('Thread name:', t.getName())
    print(t.is_alive())
    # t.join()
